package mrusanov.ui.battle

import javax.swing.JPanel
import mrusanov.battle.Battle
import mrusanov.team.{ Club, Team }
import java.awt.BorderLayout
import mrusanov.util.swing.EventConsumer
import mrusanov.tournament.MatchInfo

class BattleContainerPanel(eventConsumer: EventConsumer[BattleResultPanel], battle: Battle, info: MatchInfo, userTeam: Team) extends JPanel {
	setLayout(new BorderLayout())

	val centerPanel = new BattlePanel(battle, userTeam, this)
	val rightPanel = new BattleRightPanel(eventConsumer, centerPanel, info)

	add(centerPanel, BorderLayout.CENTER)
	add(rightPanel, BorderLayout.WEST)

	def refreshRightPanel() {
		rightPanel.refresh()
	}
}
